<template>
	<view class="orderdetails">
		<view class="order_content content1" v-if="com_zn==''">
			<image src="/pagesB/static/hezi.png" mode="widthFix"></image>
			<view class="">
				新品上架暂时还没有评价<br/>快购买一个给我们真实的评价吧
			</view>
		</view>
		<view class="order_content" v-else>
			<view class="order_top">
				<image src="/pagesB/static/Orderdet_fukuan@2x1.png" mode=""></image>
				<view class="top_content">
					<view class="content_title">承运公司：{{Item.com_zn}}</view>
					<view class="content_text">运单编号：{{Item.nu}}</view>
				</view>
			</view>
			
			<view class="order_express" v-for="(i,x) in Item.data" :key="x">
				<view class="h" v-if="x+1!=Item.data.length"></view>
				<view class="bull" :class="x==0?'bull1':''"></view>
				<view class="itemLeft">
					<view class="addressItem">
						<view class="ItemAddress">{{ i.time}}</view>
						<view class="ItemTitle">
							<view class="ItemPhone">{{ i.context }}</view>
						</view>
					</view>
				</view>
			</view>
	</view>

	</view>
</template>

<script>
import md5 from '@/common/api/md5.js';
	import {requestUrl} from '@/common/config.js'
export default {
	data() {
		return {
			order_sn: '',
			access_token: '',
			time: '',
			Item:[], 
			}
			},
	onLoad(option) {
		this.$request('/app/order/getLogistics','post',{
				access_token:uni.getStorageSync('access_token').replace(/^\"|\"$/g,''),
				order_sn:option.id
			}).then(res=>{
				this.Item=res.content
				console.log(this.Item.length)
			})
	},
	methods:{
	}
};
</script>

<style lang="less" scoped>
.orderdetails {
	height: 100%;
	background-color: #f3f4f5;
	display: flex;
	flex-direction: column;
	.content1{
		height: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #AAAAAA;
		image{
			width: 200px;
		}
		view{
			text-align: center;
		}
	}
	.order_top {
		padding: 40rpx 70rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background: #db1b22;
		image {
			width: 120rpx;
			height: 120rpx;
		}
		.top_content {
			flex: 1;
			margin-left: 50rpx;
			.content_title {
				font-size: 30rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #ffffff;
				margin-bottom: 10rpx;
			}
			.content_text {
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #ffffff;
			}
		}
	}
	
	.order_content{
		flex: 1;
		overflow-y: scroll;
		.order_express {
			padding: 20rpx 0 20rpx 30rpx;
			// background: url(@/static/icon_logistics_00.png) no-repeat 20rpx 78rpx;
			// background-size: 28rpx 24rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			background-color: #fff;
			position: relative;
			.h{
				width: 1px;
				height: 100%;
				background: #EEEEEE;
				position: absolute;
				top: 74rpx;
				left: 51rpx;
				z-index: 1;
			}
			.bull{
				width: 22rpx;
				height: 22rpx;
				background: #DDDDDD;
				position: absolute;
				top: 56rpx;
				left: 40rpx;
				border-radius: 11rpx;
				z-index: 10;
			}
			.bull1{
				background: #FFB305;
			}
			.itemRight{
				width: 20px;
				height: 20px;
				background: url(/pagesB/static/direction_right_gray.png) no-repeat 0px 0px;
				background-size: 100% 100%;
				position: absolute;
				bottom: 70rpx;
				right: 30rpx;
			}
			.itemLeft {
				margin-left: 50rpx;
				border-bottom: 1px solid #eeeeee;
				.addressnone {
					padding: 40rpx 0;
					font-size: 26rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #9da5a8;
				}
				.addressContent {
					flex: 1;
					background-color: #f3f4f5;
					padding-top: 20rpx;
				}
				.addressItem {
					padding: 30rpx 30rpx 30rpx 0;
					background: #fff;
					.Active {
						font-size: 24rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #ffffff;
						background: #db1b22;
						border-radius: 6rpx;
						margin-right: 20rpx;
						padding: 6rpx 14rpx;
					}
					.ItemTitle {
						display: flex;
						align-items: center;
						.ItemName {
							font-size: 32rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #111111;
						}
						.ItemPhone {
							font-size: 26rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #111111;
						}
					}
					.ItemAddress {
						font-size: 26rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #9da5a8;
						margin-bottom: 16rpx;
					}
				}
			}
		}
		.order_address {
			padding: 20rpx 30rpx;
			margin: 0 0 10rpx;
			background: url(/pagesB/static/order_adress.png) no-repeat 20rpx 78rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			background-color: #fff;
			.itemLeft {
				margin-left: 30rpx;
				.addressnone {
					padding: 40rpx 0;
					font-size: 26rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #9da5a8;
				}
				.addressContent {
					flex: 1;
					background-color: #f3f4f5;
					padding-top: 20rpx;
				}
				.addressItem {
					padding: 30rpx;
					background: #fff;
					.Active {
						font-size: 24rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #ffffff;
						background: #db1b22;
						border-radius: 6rpx;
						margin-right: 20rpx;
						padding: 6rpx 14rpx;
					}
					.ItemTitle {
						display: flex;
						margin-bottom: 16rpx;
						align-items: center;
						height: 34rpx;
						.ItemName {
							font-size: 32rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #111111;
						}
						.ItemPhone {
							margin-left: 22rpx;
							font-size: 26rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #111111;
						}
					}
					.ItemAddress {
						font-size: 26rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #9da5a8;
					}
				}
			}
		}
		.order_amount {
			background-color: #fff;
			margin-bottom: 10rpx;
			.item_content {
				padding: 20rpx;
				border-bottom: 1px solid #eeeeee;
				.Item_content{
				display: flex;
					
				}
				.item_buttom{
					display: flex;
					justify-content: flex-end;
					padding-top: 20rpx;
					.buttom{
						padding: 10rpx 20rpx;
						font-size: 24rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #111111;
						background: #FFFFFF;
						border-radius: 13px;
						border: 1px solid #777777;
					}
				}
				image {
					height: 180rpx;
					width: 180rpx;
					margin-right: 16rpx;
				}
				.ItemContent {
					flex: 1;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					.title {
						height: 72rpx;
						font-size: 28rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #111111;
					}
					.parameter {
						height: 34rpx;
						font-size: 24rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #9da5a8;
					}
					.price_ctrlbox {
						display: flex;
						justify-content: space-between;
					}
					.price {
						font-size: 28rpx;
						font-family: PingFangSC-Medium, PingFang SC;
						font-weight: 500;
						color: #111111;
					}
					.ctrlbox {
						font-size: 24rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #9da5a8;
					}
				}
			}
			.order_price1 {
				padding: 0 24rpx 24rpx 24rpx;
			}
			.order_price {
				margin-top: 24rpx;
				height: 100%;
				display: flex;
				justify-content: space-between;
				.price_left {
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #111111;
				}
				.price_right {
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #111111;
				}
				.price_right1 {
					font-size: 28rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #db1b22;
				}
			}
		}
		.order_comment {
			padding: 32rpx 22rpx;
			margin-bottom: 10rpx;
			background-color: #fff;
			font-size: 24rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #111111;
		}
		.order_id {
			padding: 24rpx;
			margin-bottom: 10rpx;
			background-color: #fff;
			.order_copy {
				display: flex;
				.order_sn {
					font-size: 24rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #111111;
				}
				.order_buttom {
					width: 60rpx;
					height: 30rpx;
					border-radius: 16rpx;
					border: 1px solid #777777;
					font-size: 20rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #111111;
					text-align: center;
					margin-left: 20rpx;
				}
			}
			.order_date {
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #111111;
				margin-top: 10rpx;
			}
		}
		
	}
	.order_bottom{
		display: flex;
		padding: 14rpx 20rpx;
		flex-direction: row-reverse;
		background-color: #fff;
		border-top: 1px solid #EBECEC;
		.order_cancel{
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
			width: 230rpx;
			height: 70rpx;
			line-height: 70rpx;
			background: #FFFFFF;
			border-radius: 36rpx;
			text-align: center;
			border: 1px solid #999999;
		}
		.order_payment{
			font-size: 28rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
			width: 230rpx;
			height: 70rpx;
			line-height: 70rpx;
			text-align: center;
			background: #DB1B22;
			border-radius: 36rpx;
			margin-left: 20rpx;
		}
	}
	.savebottom {
		padding-bottom: 0;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);
	}
}
</style>
